<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>CSS Test: Changing the 'transition-delay' property immediately after applying a transition results in the first delay being used.</title>
        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
        <link rel="help" href="http://www.w3.org/TR/css3-transitions/#starting" />
        <meta name="flags" content="animated dom" />
        <meta name="assert" content="Changing the 'transition-delay' property immediately after applying a transition results in the first delay being used." />
        <style type="text/css">
            #endDiv
            {
                background-color: orange;
                height: 50px;
                left: 400px;
                position: absolute;
                width: 50px;
            }
            #testDiv
            {
                background-color: blue;
                height: 50px;
                left: 5px;
                position: absolute;
                transition-property: left;
                transition-duration: 5s;
                transition-delay: 0s;
                width: 50px;
            }
        </style>
        <script type="text/javascript">
            function startTest()
            {
                document.body.offsetWidth;
                var element = document.getElementById("testDiv");
                element.style['left'] = '400px'; 
                element.style['transition-delay'] = '10s';
            }
        </script>
    </head>
    <body onload="startTest()">
        <p>Test passes if the blue square begins sliding to the orange one immediately.</p>
        <div id="endDiv"></div>
        <div id="testDiv"></div>
    </body>
</html>
